/**
 * Copyright (C) 2007 Cape Henry Technologies Inc.
 * <p/>
 * This program is open software. It is licensed using the Apache Software
 * Foundation, version 2.0 January 2004
 * <p/>
 * <a href="mailto:dlwhitehurst@gmail.com">dlwhitehurst@gmail.com</a>
 *
 * @author David L. Whitehurst
 * @version 1.0
 */
package org.cht.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="client")
public class Client extends BaseObject implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -1293615309255629805L;

    private Long id;
    
    private String name; // required
    private String address1;
    private String address2;
    private String city;
    private String state;
    private String zip;
    private boolean contracted;
    private boolean primeContractor;

    //private Long projectid;
    private Long nextid; // parent->child only (beginning with prime)
    
    
    @Override
    public boolean equals(Object o) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public int hashCode() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public String toString() {
        // TODO Auto-generated method stub
        return null;
    }

    @Id @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(nullable=false,length=50,unique=true)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    @Column(nullable=true,length=50)
    public String getAddress1() {
        return address1;
    }

    public void setAddress1(String address1) {
        this.address1 = address1;
    }

    @Column(nullable=true,length=50)
    public String getAddress2() {
        return address2;
    }

    public void setAddress2(String address2) {
        this.address2 = address2;
    }

    @Column(nullable=true,length=50)
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Column(nullable=true,length=20)
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Column(nullable=true,length=20)
    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    @Column
    public boolean isContracted() {
        return contracted;
    }

    public void setContracted(boolean contracted) {
        this.contracted = contracted;
    }

    @Column
    public boolean isPrimeContractor() {
        return primeContractor;
    }

    public void setPrimeContractor(boolean primeContractor) {
        this.primeContractor = primeContractor;
    }

}
